<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>学员信息表单</title>
  <style>
    body {
      font-family: Arial, sans-serif;
    }
    .form-container {
      max-width: 400px;
      margin: auto;
      padding: 20px;
      border: 1px solid #ccc;
      border-radius: 10px;
    }
    .form-container h2 {
      text-align: center;
    }
    .form-group {
      margin: 10px 0;
    }
    .form-group label {
      display: block;
      margin-bottom: 5px;
    }
    .form-group input,
    .form-group select {
      width: 100%;
      padding: 8px;
      margin-top: 5px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    .form-group input[type="submit"] {
      background-color: #4CAF50;
      color: white;
      border: none;
      cursor: pointer;
    }
    .form-group input[type="submit"]:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>
<div class="form-container">
  <h2>学员信息表单</h2>
  <form action="StudentInfoServlet" method="POST" enctype="multipart/form-data">
    <div class="form-group">
      <label for="name">姓名：</label>
      <input type="text" id="name" name="name" required>
    </div>
    <div class="form-group">
      <label for="gender">性别：</label>
      <select id="gender" name="gender" required>
        <option value="男">男</option>
        <option value="女">女</option>
      </select>
    </div>
    <div class="form-group">
      <label for="age">年龄：</label>
      <input type="number" id="age" name="age" required>
    </div>
    <div class="form-group">
      <label for="major">专业：</label>
      <input type="text" id="major" name="major" required>
    </div>
    <div class="form-group">
      <label for="phone">联系方式：</label>
      <input type="tel" id="phone" name="phone">
    </div>
    <div class="form-group">
      <label for="idCard">身份证号：</label>
      <input type="text" id="idCard" name="idCard">
    </div>
    <div class="form-group">
      <label for="avatar">头像（可选）：</label>
      <input type="file" id="avatar" name="avatar">
    </div>
    <div class="form-group">
      <label for="college">学院：</label>
      <input type="text" id="college" name="college">
    </div>
    <div class="form-group">
      <label for="class">班级：</label>
      <input type="text" id="class" name="class">
    </div>
    <div class="form-group">
      <input type="submit" value="提交">
    </div>
  </form>
</div>
</body>
</html>
